package com.sf.fy.uav.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sf.fy.uav.common.response.operational.UserCouponResponse;
import com.sf.fy.uav.entity.CouponIntroductionUser;
import com.sf.fy.uav.mapper.CouponIntroductionUserMapper;
import com.sf.fy.uav.service.CouponIntroductionUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lixiang
 * @since 2023-10-25
 */
@RestController
@RequestMapping("/uav/couponIntroductionUser")
public class CouponIntroductionUserRest {
    @Autowired
    private CouponIntroductionUserService couponIntroductionUserService;
    @Autowired
    private CouponIntroductionUserMapper couponIntroductionUserMapper;
    public List<CouponIntroductionUser> getCouponIntroductionUsers(String couponId) {
        return couponIntroductionUserService.list(new QueryWrapper<CouponIntroductionUser>().eq("coupon_id",couponId));
    }
    public void insertCouponIntroductionUsers(List<CouponIntroductionUser> couponIntroductionUsers) {
        couponIntroductionUserMapper.insertBatchSomeColumn(couponIntroductionUsers);

    }
}
